Skip to content

[SYCL] Remove secondary submission queue from handler #17967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 15, 2025

Conversation

uditagarwal97
Copy link
Contributor

@uditagarwal97 uditagarwal97 commented Apr 11, 2025

handler's secondary queue is not used for any meaningful work.

@uditagarwal97 uditagarwal97 marked this pull request as ready for review April 11, 2025 01:38
@uditagarwal97 uditagarwal97 requested a review from a team as a code owner April 11, 2025 01:38
@uditagarwal97
Copy link
Contributor Author

@jbrodman FYI

@uditagarwal97 uditagarwal97 requested a review from Copilot April 11, 2025 01:40
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (3)
  • sycl/source/detail/handler_impl.hpp: Language not supported
  • sycl/source/handler.cpp: Language not supported
  • sycl/unittests/SYCL2020/KernelBundle.cpp: Language not supported

bool EventNeeded)
handler_impl(
std::shared_ptr<queue_impl> SubmissionPrimaryQueue,
[[maybe_unused]] std::shared_ptr<queue_impl> SubmissionSecondaryQueue,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to keep the secondary queue argument in handler_impl? Can we remove it here, and just keep it in the handler for ABI compatibility?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Applied in 14dc5ac

@uditagarwal97 uditagarwal97 changed the title [SYCL] Get rid of secondary submission queue from handler [SYCL] Remove secondary submission queue from handler Apr 11, 2025
return false;
}
return true;
assert(impl->MSubmissionPrimaryQueue &&
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slawekptak Since the last review, I've also removed null check and converted to assert instead. It's unlikely to have a null primary queue in handler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the info. Let me share one more thought/question. It seems like handler_impl can be constructed using a graph instead of queues. In this case, this function (and other 2) used to return true, now they would crash/assert. The question is, are these functions used at all with the graph version of the handler? Please note that the use_kernel_bundle function would check if the graph is there, and in this case get the context from the graph instead of the queue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like handler_impl can be constructed using a graph instead of queues.

I didn't know that handler_impl ca be constructed using a graph. You're right, we should not assert in that case. My whole assumption was that we can't have a handler without a queue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slawekptak I've re-added the null check in 0757546

@uditagarwal97 uditagarwal97 merged commit 08d11bc into sycl Apr 15, 2025
45 of 51 checks passed
@uditagarwal97 uditagarwal97 deleted the handler_remove_second_q branch April 15, 2025 21:10
uditagarwal97 added a commit that referenced this pull request Apr 16, 2025
Follow up of #17967
Secondary submission queue is optional in SYCL Spec and it has been
decided to remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants